import java.io.File;

public class Demo3 {
    public static void main(String[] args) throws InterruptedException {
        File file=new File("./class.txt");
        boolean result=file.delete();
        //进程结束后删除
        //file.deleteOnExit();
        Thread.sleep(10000);
        System.out.println(result);
    }
}
